package site.sorghum.ddl.spring;

import org.noear.wood.DbContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

@Configuration
public class DbConfig {

    @Bean
    DbContext dbContext(@Autowired DataSource dataSource) {
        return new DbContext(dataSource);
    }
}
